home *** CD-ROM | disk | FTP | other *** search
- -- card: 6668 from stack: in.3r
- -- bmap block id: 0
- -- flags: 0000
- -- background id: 3837
- -- name: PopUpMenu
- ----- HyperTalk script -----
- on closecard
- hide message window
- end closecard
-
-
- -- part 1 (button)
- -- low flags: 00
- -- high flags: A004
- -- rect: left=201 top=235 right=254 bottom=262
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Example
- ----- HyperTalk script -----
- on mousedown
- if the optionkey is down then
- edit script of target
- exit mousedown
- end if
-
- put the mouseloc into myPlace
- put item 1 of myPlace - 20 into horiz
- put item 2 of myPlace - 10 into vert
- get PopUpMenu("Hello;my;name;is;Steve", 1, vert, horiz)
- put "You chose item" && it
- end mousedown
-
-
-
- -- part 2 (button)
- -- low flags: 00
- -- high flags: A004
- -- rect: left=200 top=259 right=278 bottom=261
- -- title width / last selected line: 0
- -- icon id / first selected line: 0 / 0
- -- text alignment: 1
- -- font id: 0
- -- text size: 12
- -- style flags: 0
- -- line height: 16
- -- part name: Another
- ----- HyperTalk script -----
- on mousedown
- if the optionkey is down then
- edit script of target
- exit mousedown
- end if
-
- put the mouseloc into myPlace
- put item 1 of myPlace - 20 into horiz
- put item 2 of myPlace - 10 into vert
- get PopUpMenu("For;a;disk;catalog;of;BMUG's;stack;library;"& "Send;$3;To;BMUG;1442A;Walnut;#62;Berkeley;CA;94709", 5, vert, horiz)
- put "You chose item" && it
- end mousedown
-
-
-
- -- part contents for background part 10
- ----- text -----
- 3
-
- -- part contents for background part 5
- ----- text -----
- PopUpMenu
-
- -- part contents for background part 6
- ----- text -----
-
- This HyperCard external function returns the selection from a popup menu created from a hypercard item list (the first parameter). The
- menu is placed on the screen so that the checked item is at the position (global) top,left.
-
-
-
- Thanks to:
- Andrew Gilmartin
- Brown University
-
-
-
- -- part contents for background part 7
- ----- text -----
- Syntax:
-
- PopUpMenu( <MenuItems>, <CheckedItem>,
- <Top>, <Left> )
-
- Returns the number of the item selected.
-
-
- "MenuItems" is a list of items seperated by commas that will comprise the menu.
-
- <CheckedItem> is the number of the item that will be initially selected & checked.
-
- <Top> is the vertical placement of the checked item.
-
- <Left> is the horizontal placement of the checked item.
-
- -- part contents for background part 27
- ----- text -----
- XFCN